<script>
    function submitForm(){
       var chbox = document.getElementsByName('ids');
       var count = 0;
       for(var i = 0;i<chbox.length;i++){
           if(chbox[i].checked){
               count++;
           }
       }
       if(count>0){
            document.getElementById('myForm').submit();
       }else{
            alertMsg.error('请选择信息！');
            return false;
       }
    }
</script>
<form id="pagerForm" method="post" action="getCpAllPost">
    <!--
    <input type="hidden" name="status" value="${param.status}">
    <input type="hidden" name="keywords" value="${param.keywords}" />
    -->
    <input type="hidden" name="pageNum" value="1" />
    <input type="hidden" name="numPerPage" value="<%=perPage%>" />
    <!--
    <input type="hidden" name="orderField" value="${param.orderField}" />//查询排序
    -->
</form>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="getCpAllPost" method="post">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <%if(sn){%>
                        <td>
                            SN : <input type="text" name="psn" value="<%=sn%>"/>
                        </td>
                    <%}else{%>
                        <td>
                            SN : <input type="text" name="psn"/>
                        </td>
                    <%}%>
                    <%if(pn){%>
                        <td>
                            产品名称：<input type="text" name="pname" value="<%=pn%>"/>
                        </td>
                    <%}else{%>
                        <td>
                            产品名称：<input type="text" name="pname"/>
                        </td>
                    <%}%>
                    <%if(tp){%>
                        <td>
                            型号：<input type="text" name="ptype" value="<%=tp%>"/>
                        </td>
                    <%}else{%>
                        <td>
                            型号：<input type="text" name="ptype"/>
                        </td>
                    <%}%>
                    <%if(ds){%>
                        <td>
                            部署地点：<input type="text" name="pds" value="<%=ds%>"/>
                        </td>
                    <%}else{%>
                        <td>
                            部署地点：<input type="text" name="pds"/>
                        </td>
                    <%}%>
                </tr>
            </table>
            <div class="subBar">
                <ul>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
                    <!--<li><a class="button" href="demo_page6.html" target="dialog" mask="true" title="查询框"><span>高级检索</span></a></li>-->
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
<div class="panelBar">
    <ul class="toolBar">
        <li><input type="checkbox" class="checkboxCtrl" group="ids" />全选</li>
        <li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="ids" postType="string" href="deleteCpBatch" class="delete"><span>批量删除</span></a></li>
        <li><a class="add" href="addCpUi" target="navTab"><span>添加</span></a></li>
        <!--
        <li><a class="delete" href="deleteCpOne?pid={pid}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
        <li><a class="edit" href="demo_page4.html?pid={pid}" target="navTab"><span>修改</span></a></li>
        -->
        <li class="line">line</li>
        <!--
        <li><a class="icon" href="makeBarcode?id={pid}" target="navTab" rel="ids"><span>生成二维码</span></a></li>
        -->
        <li><a class="icon" href="javascript:void(0)" onclick="submitForm();" rel="ids"><span>批量生成二维码</span></a></li>

    </ul>
</div>
<form action="makeBarcode" method="post" id="myForm">
<table class="table" width="100%" layoutH="138">
<thead>
<tr>
    <th width="30">选择</th>
    <th width="60" align="center">SN</th>
    <th width="120" align="center">产品名称</th>
    <th width="100" align="center">型号</th>
    <th width="80" align="center">出厂日期</th>
    <th width="80" align="center">部署地点</th>
    <th width="50" align="center">批号</th>
    <th width="85" align="center">生产入库时间</th>
    <th width="80" align="center">入库质检人</th>
    <th width="80" align="center">入库管理员</th>
    <th width="50" align="center">质保期</th>
    <th width="80" align="center">出库时间</th>
    <th width="80" align="center">出库管理员</th>
    <th width="60" align="center">提货性质</th>
    <th width="50" align="center">提货人</th>
    <th width="50" align="center">更多</th>
    <th width="100" align="center">操作</th>
</tr>
</thead>
<tbody>
<%cps.forEach(function(cp){%>
    <%include cp%>
<%})%>
</tbody>
</table>
</form>
<div class="panelBar">
    <div class="pages">
        <span>显示</span>
        <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
            <option value="20">20</option>
            <option value="80">80</option>
            <option value="90">90</option>
            <option value="100">100</option>
            <option value="200">200</option>
        </select>
        <span>条，共<%=total%>条</span>
    </div>

    <div class="pagination" targetType="navTab" totalCount="<%=total%>" numPerPage="<%=perPage%>" pageNumShown="<%=perPage%>" currentPage="<%=page%>"></div>

</div>
</div>
